package com.yl.danmo.service.impl;


import com.yl.common.core.utils.DateUtils;
import com.yl.danmo.domain.DanmoPersonInfo2;
import com.yl.danmo.mapper.DanmoPersonInfo2Mapper;
import com.yl.danmo.service.IDanmoPersonInfo2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 会员详情2Service业务层处理
 * 
 * @author yl
 * @date 2025-04-12
 */
@Service
public class DanmoPersonInfo2ServiceImpl implements IDanmoPersonInfo2Service
{
    @Autowired
    private DanmoPersonInfo2Mapper danmoPersonInfo2Mapper;

    /**
     * 查询会员详情2
     * 
     * @param id 会员详情2主键
     * @return 会员详情2
     */
    @Override
    public DanmoPersonInfo2 selectDanmoPersonInfo2ById(Long id)
    {
        return danmoPersonInfo2Mapper.selectDanmoPersonInfo2ById(id);
    }

    /**
     * 查询会员详情2列表
     * 
     * @param danmoPersonInfo2 会员详情2
     * @return 会员详情2
     */
    @Override
    public List<DanmoPersonInfo2> selectDanmoPersonInfo2List(DanmoPersonInfo2 danmoPersonInfo2)
    {
        return danmoPersonInfo2Mapper.selectDanmoPersonInfo2List(danmoPersonInfo2);
    }

    /**
     * 新增会员详情2
     * 
     * @param danmoPersonInfo2 会员详情2
     * @return 结果
     */
    @Override
    public int insertDanmoPersonInfo2(DanmoPersonInfo2 danmoPersonInfo2)
    {
        danmoPersonInfo2.setCreateTime(DateUtils.getNowDate());
        return danmoPersonInfo2Mapper.insertDanmoPersonInfo2(danmoPersonInfo2);
    }

    /**
     * 修改会员详情2
     * 
     * @param danmoPersonInfo2 会员详情2
     * @return 结果
     */
    @Override
    public int updateDanmoPersonInfo2(DanmoPersonInfo2 danmoPersonInfo2)
    {
        danmoPersonInfo2.setUpdateTime(DateUtils.getNowDate());
        return danmoPersonInfo2Mapper.updateDanmoPersonInfo2(danmoPersonInfo2);
    }

    /**
     * 批量删除会员详情2
     * 
     * @param ids 需要删除的会员详情2主键
     * @return 结果
     */
    @Override
    public int deleteDanmoPersonInfo2ByIds(Long[] ids)
    {
        return danmoPersonInfo2Mapper.deleteDanmoPersonInfo2ByIds(ids);
    }

    /**
     * 删除会员详情2信息
     * 
     * @param id 会员详情2主键
     * @return 结果
     */
    @Override
    public int deleteDanmoPersonInfo2ById(Long id)
    {
        return danmoPersonInfo2Mapper.deleteDanmoPersonInfo2ById(id);
    }
}
